Setup Ubuntu Dummy Desktop & Remote Access

When you use Remmina client to connect to another unbuntu-running device (so-called VNC server) but it does not have a monitor, you’ll get a black screen.

To create a dummy monitor to be run by the VNC server by default, do:

  1. SSH to the VNC server, or connect a physical monitor and open the terminal, e.g. ssh nuc@192.168.1.25

  2. Install the dummy monitor driver

sudo apt-get install  xserver-xorg-core-hwe-18.04
sudo apt-get install  xserver-xorg-video-dummy-hwe-18.04  --fix-missing
  1. Create a xorg.conf file to be run by default by running
sudo nano /usr/share/X11/xorg.conf.d/xorg.conf

Then copy the following to the xorg.conf file

Section "Monitor"
    Identifier "Monitor0"
    HorizSync 28.0-80.0
    VertRefresh 48.0-75.0
    # https://arachnoid.com/modelines/
    # 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
    Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
EndSection
Section "Device"
    Identifier "Card0"
    Driver "dummy"
    VideoRam 256000
EndSection
Section "Screen"
    DefaultDepth 24
    Identifier "Screen0"
    Device "Card0"
    Monitor "Monitor0"
    SubSection "Display"
        Depth 24
        Modes "1920x1080_60.00"
    EndSubSection
EndSection
  1. Restart the VNC server (sudo reboot).

Notice:

When connecting a physical monitor, the physical monitor will be ignored. To allow the physical monitor to be used again, remove the xorg.conf file from the /usr/share/X11/xorg.conf.d/ path.

Still looking for a better alternative.